package com.lzl.edu.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * <h3>leezhongloong_ws</h3>
 * <p>用户对象</p>
 *
 * @author : 黎钟龙
 * QQ:1661548820
 * Mail：1661548820@qq.com
 * @date : 2022-03-18 08:59
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Table(name = "tb_user")//指定数据表
public class User {
//    id
    @Id//说明是Id
    @KeySql(useGeneratedKeys = true)//使用产生的key
    private Long id;
//    user_name
    private String userName;
//    password
    private String password;
//    name
    private String name;
//    age
    private Integer age;
//    sex 1、男，2、女
    private Integer sex;
//    birthday
    private Date birthday;
//    note
    private String note;
//    created
    private Date created;
//    updated
    private Date updated;
//    dbname
    @Column(name = "dbname") //解决java字段与数据库字段不匹配的问题
    private String dbname;

}
